@extends('home.base.base')

@section("head")
    <link rel="stylesheet" href="/public/statics/css/list.css?v=1" />
    <style>
        body{background:#f2f2f2;}

        .page{margin-top:10px;}
        .page:after{content:'';display:block;clear:both;}
        .page li{float:left;  width: 25px;    height: 25px;  text-align: center;  line-height: 25px;  background: #333; color: white;  margin:2px;padding:5px;cursor:pointer;}
        .page li.active{background: darkgoldenrod;color:white;}
        .page li.active a{color:#005cac;}
        .page li a{text-decoration: none;color:white;}

    </style>
@endsection


@section("content")

    <div class="jf-container">

        <div class="jfn-block cls">

            <div class="jf-fl jf-w-781  jfn-article-list">

                <div class="jf-h-50 jf-relative">
                    <img src="/public/statics/img/system/17.jpg"  class="jf-absolute jfs-decoration" />
                    <span style="position: absolute;color:white;margin-top:5px;">{{ $query->getCid($cid)['title'] }}</span>
                </div>

                @foreach($posts as $key => $val )
                <div class="jfs-item cls ">
                    <div class="jfs-img jf-fl ">
                        <img src="{{ $val->cover }}"  style="width:257px;height:169px;" />
                    </div>
                    <div class="jfs-article jf-fl">
                        <div class="jfs-title">
                            <a  href="/post/{{$val->id}}" >{{ $val->title }}</a>
                        </div>
                        <div class="jfs-desc">
                            {{ mb_substr($val->description,0,200) }}
                        </div>
                        <div class="jfs-tag">
                            {{ $val->created_at }}
                        </div>
                    </div>
                </div>
                @endforeach
                <div class="page">{{$posts->links()}}</div>


            </div>

            @include('home.base.right')
        </div>



       @include('home.base.friend')



    </div>

@endsection